package ioperations;

import book.Book;
import book.BookList;

public class ListOp implements IOperation{
    @Override
    public void work(BookList books) {
        System.out.println("Books As follows:");
        int cnt = 0;
        for(Book book : books.getList()){
            if(book == null) break;
            System.out.println(book);
            ++cnt;
        }
        System.out.println("Book number: " + cnt);
        books.setUsed_size(cnt);
    }
}
